<?php
namespace app\common\model;

use think\Model;

class Member extends Model
{
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

	//关联组
	public function group()
    {
        return $this->belongsTo(MemberGroup::class);
    }

    public function getStatusTextAttr($value,$data)
    {
        $status = [0=>'禁用',1=>'正常'];
        return $status[$data['status']];
    }

}